﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="CurrentBids.aspx.cs" 
Inherits="Nivdal.CurrentBids" Theme="SkinFile" %>
<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_PageNameLabel %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="basic_element">
    <asp:Label ID="Message" runat="server" Text="" SkinID="ConfirmLabel"></asp:Label>
    <div class="red_title">
        <asp:Label ID="Label1" runat="server" Text="<%$ Resources:Resource, CurrentBids_PageNameLabel %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:FormView ID="BidsSummaryFormView" runat="server" DataSourceID="BidsSummaryDataSource" Width="100%">
        <ItemTemplate>
            <table cellpadding="5">
            <tr>     
            <td rowspan="3">
                <asp:Image ID="EconomicsManImage" runat="server" ImageUrl="~/Images/Icons/Finance.png" ToolTip="<%$ Resources:Resource, Global_Finances %>"  />
            </td>   
            <td>
                <asp:Label ID="TotalBidsTitleLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_TotalBids %>" SkinID="InfoLabel"></asp:Label>
            </td>
            <td>
                <asp:Label ID="TotalBidsLabel" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("TotalBids")) %>' SkinID="GridLabel"></asp:Label>
            </td>
            </tr>
            <tr>
            <td>
                <asp:Label ID="TotalConditionalBidsTitleLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_TotalConditionalBids %>" SkinID="InfoLabel"></asp:Label>
            </td>
            <td>
                <asp:Label ID="TotalConditionalBidsLabel" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("TotalConditionalBids")) %>' SkinID="GridLabel"></asp:Label>
            </td>
            </tr>
            <tr>
            <td>
                <asp:Label ID="TotalSalesTitleLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_TotalSales %>" SkinID="InfoLabel"></asp:Label>
            </td>
            <td>
                <asp:Label ID="TotalSalesLabel" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("TotalSales")) %>' SkinID="GridLabel"></asp:Label>
            </td>
            </tr>

            </table>
        

        </ItemTemplate>
        </asp:FormView>
        <asp:SqlDataSource ID="BidsSummaryDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetCurrentBidsSum" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
    </div>
    </div>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="BuyingPlayersLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_BuyingPlayersLabel %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:GridView ID="BuyingPlayersGridView" runat="server" SkinID="Professional" AutoGenerateColumns="False" DataSourceID="BuyingPlayersSqlDataSource">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Label ID="PlayersLabel" runat="server" Text="<%$ Resources:Resource, Global_PlayerName %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="PlayersHyperLink" runat="server" Text='<%# Eval("PlayerName") %>'
                            NavigateUrl='<%# Eval("PlayerId", "Player.aspx?Id={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_CurrentBid %>">
                    <ItemTemplate>
                        <asp:Label ID="CurrentBidLabel" runat="server"  Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("CurrentBid")) %>' SkinID="GridLabel"> </asp:Label>
                        <asp:Panel ID="BiddingTeamPanel" runat="server" Visible='<%# Eval("BiddingTeamVisible") %>' style="display:inline;">
                            <asp:HyperLink ID="BidByHyperlink" runat="server" NavigateUrl='<%# "~/TeamHomePage.aspx?TeamId="+Eval("BidByTeamId") %>'
                             Text='<%# " (" + Eval("BidByTeamName") + ")" %>' SkinID="GreenTitleHyperLink"></asp:HyperLink>
                        </asp:Panel>                    
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, CurrentBids_ConditionalBidHeaderText %>">
                    <ItemTemplate>
                        <asp:Label ID="ConditionalBidLabel" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("ConditionalBid")) %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>            
                <asp:TemplateField HeaderText="<%$ Resources:Resource, CurrentBids_TransferDeadlineHeaderText %>">
                    <ItemTemplate>
                        <asp:Label ID="TransferDeadlineLabel" runat="server"  Text='<%# Eval("TransferDeadline")%>' SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="CurrentlyNotBuyingPlayersLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_CurrentlyNotBuyingPlayersLabel%>" SkinID="InfoLabel"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:SqlDataSource ID="BuyingPlayersSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetCurrentBidsOnPlayers" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
    </div>
    </div>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="BuyingCoachesLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_BuyingCoachesLabel %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:GridView ID="BuyingCoachesGridView" runat="server" SkinID="Professional" AutoGenerateColumns="False" DataSourceID="BuyingCoachesSqlDataSource">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Label ID="CoachNameLabel" runat="server" Text="<%$ Resources:Resource, Global_CoachName %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="CoachHyperLink" runat="server" Text='<%# Eval("CoachName") %>'
                            NavigateUrl='<%# Eval("CoachId", "Coach.aspx?Id={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_CurrentBid %>">
                    <ItemTemplate>
                        <asp:Label ID="CurrentBidLabel" runat="server"  Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("CurrentBid"))%>' SkinID="GridLabel"> </asp:Label>
                        <asp:Panel ID="BiddingTeamPanel" runat="server" Visible='<%# Eval("BiddingTeamVisible") %>' style="display:inline;">
                            <asp:HyperLink ID="BiddingTeamHyperlink" runat="server" Text='<%# " (" + Eval("BiddingTeamName") + ")" %>'
                            SkinID="GreenTitleHyperLink" NavigateUrl='<%# "TeamHomePage.aspx?TeamId=" + Eval("BiddingTeamId") %>'></asp:HyperLink>
                        </asp:Panel>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, CurrentBids_ConditionalBidHeaderText %>">
                    <ItemTemplate>
                        <asp:Label ID="ConditionalBidLabel" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("ConditionalBid")) %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>            
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, CurrentBids_TransferDeadlineHeaderText %>">
                    <ItemTemplate>
                        <asp:Label ID="TransferDeadlineLabel" runat="server"  Text='<%# Eval("TransferDeadline")%>' SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="CurrentlyNotBuyingCoachesLabel" runat="server" Text="<%$ Resources:Resource, CurrentlyNotBuyingCoachesLabel %>" SkinID="InfoLabel"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:SqlDataSource ID="BuyingCoachesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetCurrentBidsOnCoaches" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>    
    </div>
    </div>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="SellingPlayersLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_SellingPlayersLabel %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:GridView ID="SellingPlayersGridView" runat="server" SkinID="Professional" 
        AutoGenerateColumns="False" DataSourceID="SellingPlayersSqlDataSource" >
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Label ID="SellingPlayerLabel" runat="server" Text="<%$ Resources:Resource, Global_PlayerName %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="CoachHyperLink" runat="server" Text='<%# Eval("PlayerName") %>'
                            NavigateUrl='<%# Eval("PlayerId", "Player.aspx?Id={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_CurrentBid %>">
                    <ItemTemplate>
                        <asp:Label ID="CurrentBidLabel" runat="server"  Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("CurrentBid"))%>' SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, CurrentBids_TransferDeadlineHeaderText %>">
                    <ItemTemplate>
                        <asp:Label ID="TransferDeadlineLabel" runat="server" Text='<%# Eval("TransferDeadline")%>' SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Label ID="BiddingTeamLabel" runat="server" Text="<%$ Resources:Resource, Globl_BiddingTeamName %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="BiddingTeamHyperLink" runat="server" Text='<%# Eval("BiddingTeamName") %>'
                            NavigateUrl='<%# Eval("BiddingTeamId", "TeamHomePage.aspx?TeamId={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="CurrentlyNotSellingPlayersLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_CurrentlyNotSellingPlayersLabel %>" SkinID="InfoLabel"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:SqlDataSource ID="SellingPlayersSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetPlayersBeingSold" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
    </div>
    </div>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="SellingCoachesLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_SellingCoachesLabel %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:GridView ID="SellingCoachesGridView" runat="server" SkinID="Professional" AutoGenerateColumns="False" DataSourceID="SellingCoachesSqlDataSource">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Label ID="SellingCoachLabel" runat="server" Text="<%$ Resources:Resource, Global_CoachName %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="CoachHyperLink" runat="server" Text='<%# Eval("CoachName") %>'
                            NavigateUrl='<%# Eval("CoachId", "Coach.aspx?Id={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_CurrentBid %>">
                    <ItemTemplate>
                        <asp:Label ID="CurrentBidLabel" runat="server"  Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("CurrentBid"))%>' SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, CurrentBids_TransferDeadlineHeaderText %>">
                    <ItemTemplate>
                        <asp:Label ID="TransferDeadlineLabel" runat="server"  Text='<%# Eval("TransferDeadline")%>' SkinID="GridLabel"> </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <asp:Label ID="TeamNameLabel" runat="server" Text="<%$ Resources:Resource, Global_TeamName %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="TeamHyperLink" runat="server" Text='<%# Eval("TeamName") %>'
                            NavigateUrl='<%# Eval("TeamId", "TeamHomePage.aspx?TeamId={0}") %>' SkinID="BlackHyperLinkSkin"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="CurrentlyNotSellingCoachesLabel" runat="server" Text="<%$ Resources:Resource, CurrentBids_CurrentlyNotSellingCoachesLabel %>" SkinID="InfoLabel"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:SqlDataSource ID="SellingCoachesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetCoachesBeingSold" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
    </div>
    </div>
    
    
</asp:Content>
